import fo,{reverse} from './reverse'

console.log(reverse('qaz'));

fo()

let name = "zs";
console.log(name);

import 'indexScss';

function ajax(url){
    return new Promise((resolve,reject) => {
        let xhr = new XMLHttpRequest();
        xhr.open('GET',url);
        xhr.send(null);
        xhr.onreadystatechange = () => {
            if(xhr.readyState != 4)return;
            if(xhr.status === 200){
                resolve(xhr.responseText)
            }else{
                reject(new Error('error'))
            }
        }
    }) 
}

ajax('/api/getuid').then((res) =>{
    console.log(res);
})

ajax('/api/banner').then((res) =>{
    console.log(res);
})

